UCF STIG Viewer Logo
Changes are coming to https://stigviewer.com. Take our survey to help us understand your usage and how we can better serve you in the future.
Take Survey

All .rhosts, .shosts, .netrc, or hosts.equiv files must be accessible by only root or the owner.


Overview

Finding ID Version Rule ID IA Controls Severity
V-4428 GEN002060 SV-45168r1_rule ECLP-1 Medium
Description
If these files are accessible by users other than root or the owner, they could be used by a malicious user to set up a system compromise.
STIG Date
SUSE Linux Enterprise Server v11 for System z 2015-10-20

Details

Check Text ( C-42512r1_chk )
Procedure:
# ls -l /etc/hosts.equiv

# ls -l /etc/ssh/shosts.equiv

# find / -name .rhosts
# ls -al /.rhosts

# find / -name .shosts
# ls -al /.shosts

# find / -name .netrc
# ls -al /.netrc

If the .rhosts, .shosts, hosts.equiv, or shosts.equiv files have permissions greater than 600, then this is a finding.
If the /etc/hosts.equiv, or /etc/ssh/shosts.equiv files are not owned by root, this is a finding.

Any .rhosts, .shosts and .netrc files outside of home directories have no meaning and are not subject to this rule
If the ~/.rhosts or ~/.shosts are not owned by the owner of the home directory where they are immediately located or by root, this is a finding.
Fix Text (F-38565r1_fix)
Ensure the permission for these files is set to 600 or more restrictive and their owner is root or the same as the owner of the home directory in which they reside.

Procedure:
# chmod 600 /etc/hosts.equiv
# chmod 600 /etc/ssh/shosts.equiv
# chown root /etc/hosts.equiv
# chown root /etc/ssh/shosts.equiv

# find / -name .rhosts
# chmod 600 //.rhosts
# chown /.rhosts

# find / -name .shosts
# chmod 600 /.shosts
# chown /.shosts

# find / -name .netrc
# chmod 600 /.netrc
# chown /.netrc